<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"prefix="fn" %>

<c:forEach items="${commodityInfos}" varStatus="item" >

<c:if test="${item.index % 4 == 0 }">
	<div class="figure-row">
</c:if>
	<div class="figure-product figure-200" id='follow_${commodityInfos[item.index].commodityId }'> <a href="index_commodity_commodityDetail.htm?commodityId=${commodityInfos[item.index].commodityId }">
	<figure> <span class="wrapper-fig-image"> <span class="fig-image"> <img onclick="javascript:self.location='index_commodity_commodityDetail.htm?commodityId=${commodityInfos[item.index].commodityId }'" src="./js/lazyload/grey.gif" data-original="${rootPicPath}${commodityInfos[item.index].qietuOne}" alt=""> </span> </span>
		<figcaption> ${commodityInfos[item.index].title} </figcaption>
	</figure>
	</a> 
	<br class="hidden">
	<span class="username"><a href="friend_friends_home.htm?userId=${commodityInfos[item.index].uploaderId }">${commodityInfos[item.index].petName}</a>&nbsp;<a href="#">贴条</a><em id="tietiao_num_${commodityInfos[item.index].commodityId }">+${commodityInfos[item.index].tietiaoNum == null ? '0' : commodityInfos[item.index].tietiaoNum}</em></span> 

	<c:choose>
		<c:when test="${user == null or user.userId == commodityInfos[item.index].uploaderId}">
		</c:when>
		<c:otherwise>
			<c:choose>
				<c:when test="${commodityInfos[item.index].myTietiaoFlag != null and commodityInfos[item.index].myTietiaoFlag > 0}">
					<br class="hidden">
					<a href="javascript:com.tietiao.shitiao('${ commodityInfos[item.index].commodityId}')" class="followed" require_login="true" id="tie_shi_${commodityInfos[item.index].commodityId }"><span></span>撕条</a> 
				</c:when>
				<c:otherwise>
					<br class="hidden">
					<a href="javascript:com.tietiao.showTietiaos('show_tie_${commodityInfos[item.index].commodityId }','${commodityInfos[item.index].commodityId }')" class="button button-follow" require_login="true" id="tie_shi_${commodityInfos[item.index].commodityId }"><span></span>贴条</a> 
				</c:otherwise>
			</c:choose>
		</c:otherwise>
	</c:choose>
	</div>
<c:if test="${item.index % 4 == 3 }">
</div>
</c:if>

</c:forEach>
<input type="hidden" id="search_size" value="${listLength }"/>		